<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>HTML表单</title>
  </head>
  <body>
    <form action="#">
      <!-- for属性的作用：点击 label 会使得 username 获得焦点 -->
      <label for="username">用户名:</label>
      <input id="username" type="text" /> <br />

      <label>密码:</label>
      <input type="password" placeholder="请输入密码" /> <br />

      <input type="text" value="请输入内容" /><br />

      <label>性别</label>
      <input type="radio" name="gender" /> 男
      <input type="radio" name="gender" /> 女
      <input type="radio" name="gender" /> 其他<br />

      <label>爱好</label>
      <input type="checkbox" name="hobby" /> 唱
      <input type="checkbox" name="hobby" /> 跳
      <input type="checkbox" name="hobby" /> Rap
      <input type="checkbox" name="hobby" /> 篮球<br />

      <input type="submit" value="上传" />
    </form>
  </body>
</html>
